package org.yoshiori.lingr.api.vo;

/**
 * @author yoshiori
 * 
 */
public enum ClientType {
	HUMAN("human"), 
	AUTOMATON("automaton");

	private String clientTypeName;

	/**
	 * @param clientTypeName
	 */
	private ClientType(String clientTypeName) {
		this.clientTypeName = clientTypeName;
	}

	/**
	 * @param type
	 * @return
	 */
	public static ClientType lookup(String type) {
		for (ClientType clientType : values()) {
			if (clientType.toString().equals(type)) {
				return clientType;
			}
		}
		return null;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see java.lang.Enum#toString()
	 */
	@Override
	public String toString() {
		return clientTypeName;
	}

}
